home *** CD-ROM | disk | FTP | other *** search
- G4C
-
- ; this is a GUI for the excellent and free Graphics and ANIM player PPShow 4
- ; (it also works with older versions of ppshow)
-
-
- WINBIG -1 30 340 132 "PPShow 4.0 GUI"
- wintype 11110001 ; a resizable window
- ;winbackground icon guis:info/bgnds/tile 0
- varpath dir.gc
-
- ;============================> Some Graphics (to fill in space)
-
- box 0 0 0 0 IN ICONDROP
-
- LINE 6 65 332 65 1
- LINE 6 67 332 67 2
-
- LINE 6 100 332 100 1
- LINE 6 102 332 102 2
-
- ;============================> AppWindow
-
- xONLOAD ; Set the default values of our vars
- setscreen dir.ppshow $*SCREEN
- pps_mode = PAL ; screen mode
- pps_res = "" ; resolution
- pps_play = "" ; loop/repeat
- pps_lace = "" ; interlace or not (use default)
- pps_flick = "" ; flicker fix (use default)
- pps_datt = "" ; use datatypes
- pps_mouse = NOMOUSE ; no mouse
- pps_oscn = "" ; overscan (use default)
- pps_cycle = "" ; cycle (use default)
- pps_noan = "" ; display animations
- pps_jifs = 0 ; Jiffies -> 0 = use default
- pps_times = 100 ; play anims 100 times
- pps_time = 60 ; show pics for 60 secs each
- guiopen dir.ppshow
-
- xonclose
- guiquit dir.ppshow
-
- xonfail
- guiquit dir.ppshow
-
- ;====================> Declare a cycler, to let the user
- ; choose the type of monitor.
-
- xCYCLER 205 5 121 12 "" pps_mode
- CSTR PAL PAL
- CSTR A2024 A2024
- CSTR 15Hz 15Hz
- CSTR NTSC NTSC
- CSTR VGA VGA
- CSTR SUPER72 SUPER72
-
- ;Note that we set the PAL first. That's because I use PAL, and want it
- ;as default - change it around if you want otherwise.
-
- ;===================> An other cycler for the Resolution Modes
-
- xCYCLER 60 5 125 12 Res. pps_res
- CSTR Default ""
- CSTR LOW LO
- CSTR HIGH HI
- CSTR "Super HIGH" SHI
- CSTR Productive PROD
- CSTR HAM HAM
-
- ;===================> Cycler for Loop/Repeat/Single play of anims
-
- xCYCLER 205 20 121 12 "" pps_play
- CSTR SINGLE ""
- CSTR LOOP LOOP
- CSTR REPEAT R
-
- ;====================> Declare some checkbox button for lace, mouse, oscn etc
-
- xCHECKBOX 60 20 26 11 Lace pps_lace L NL OFF
- xCHECKBOX 140 20 26 11 NoFlk pps_flik NF "" OFF
- xCHECKBOX 60 35 26 11 DTyp pps_datt DT "" OFF
- xCHECKBOX 140 35 26 11 Mouse pps_mouse "" NOMOUSE OFF
- xCHECKBOX 220 35 26 11 Oscn pps_oscn MO NO OFF
- xCHECKBOX 300 35 26 11 Cycle pps_cycle CYCLE "" OFF
-
-
- ;-----> Slider for Time (seconds to show each picture)
-
- xHSLIDER 60 50 200 11 Time pps_time 1 999 60 "%3ld Sec."
- GadID 10
-
-
- ;=================== ANIMATION OPTIONS ==============================
-
- ;----> Checkbox for Animation ON/OFF (also jifs/times slider ON/OFF)
-
- xCHECKBOX 60 73 26 11 Anim pps_noan "" NOANIM ON
- if $pps_noan = ""
- SetGad dir.ppshow 15 ON
- setgad dir.ppshow 11 ON
- else
- SetGad dir.ppshow 15 OFF
- setgad dir.ppshow 11 OFF
- endif
-
-
- ;----> Slider for speed
-
- xHSLIDER 87 73 170 11 "" pps_jifs 0 10 0 "%2ld Jfs"
- GadID 15
-
-
- ;-----> Slider for Times to play
-
- xHSLIDER 60 86 200 11 Times pps_times 1 999 100 "%3ld"
- GadID 11
-
-
- ;=========================== Play the mess!
- ; Here we use some tricks to feed the files to ppshow 20 at a time, so
- ; we don't load and reload ppshow for every file. We use xOnReturn to
- ; re-launch ppshow when it's done showing each batch of files
-
-
- xbutton 15 110 80 15 PLAY
- id = $$LV.ID ; get the listview's id
- if $$LV.GUI == dir.gc ; check that it's dir.gc calling
- else
- ezreq "Choose files from DIR.GC" OK ""
- endif
- lvmulti first ; get first file
- if $lv_file = "" ; if no files selected
- ezreq "No files chosen!" OK ""
- endif
- if $$LV.TYPE != FILE
- ezreq "Please choose files\nnot directories." OK ""
- endif
- cd $$LV.DIR ; cd to the current directory
- pps_abort = 0 ; a flag to tell us to stop
-
- ; ok.. now collect the first 20 files
- pps_num = 0 ; start a counter
- pps_files = ""
- while $pps_num < 20
- extract lv_file ext pps_ext
- if $pps_ext == .info
- ; do nothing
- else
- extract lv_file file pps_file
- appvar pps_files ' $pps_file'
- counter pps_num inc 1
- endif
- lvmulti next
- if $lv_file = "" ; no more files
- pps_num = 20
- pps_abort = 1
- else
- endwhile
- gosub dir.ppshow makecom
- launch 1 'c:ppshow >nil: $pps_files $pps_com'
-
-
- xOnReturn 1
- if $pps_abort = 1 ; check Stop flag
- stop
- endif
- pps_num = 0 ; re-start counter
- pps_files = ""
- lvmulti next
- if $lv_file = ""
- stop
- endif
- while $pps_num < 20
- extract lv_file ext pps_ext
- if $pps_ext == .info
- ; do nothing
- else
- extract lv_file file pps_file
- appvar pps_files ' $pps_file'
- counter pps_num inc 1
- endif
- lvmulti next
- if $lv_file = "" ; no more files
- pps_num = 20
- pps_abort = 1
- else
- endwhile
- gosub dir.ppshow makecom
- launch 1 'c:ppshow >nil: $pps_files $pps_com'
-
-
- ; ---------- Abort after returning from current ppshow launch (set flag)
-
- xbutton 255 110 70 15 Stop
- pps_abort = 1
-
-
- ; ----------- Routine to construct the rest of the command line
-
- xRoutine makecom
- pps_com = $pps_mode ; screen mode
- if $pps_res > ""
- appvar pps_com ' $pps_res' ; screen resolution
- endif
- if $pps_play > ""
- appvar pps_com ' $pps_play' ; play single/loop etc for anims
- endif
- appvar pps_com ' $pps_lace' ; interlace or not
- if $pps_flick > ""
- appvar pps_com ' $pps_flick' ; ficker fix
- endif
- if $pps_datt > ""
- appvar pps_com ' $pps_datt' ; use datatypes
- endif
- if $pps_mouse > ""
- appvar pps_com ' $pps_mouse' ; show mouse ?
- endif
- appvar pps_com ' $pps_oscn' ; max or no overscan ?
- if $pps_cycle > ""
- appvar pps_com ' $pps_cycle' ; cycle
- endif
- appvar pps_com ' TIME=$pps_time' ; time to play pics
- if $pps_noan = "" ; i.e. display animations
- if $pps_jifs > 0 ; 0 = use default
- appvar pps_com ' J=$pps_jifs'
- endif
- appvar pps_com ' T=$pps_times' ; times to play anim
- endif
-
-
-
-
-
-
-
-
-